package com.xiaoge.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
* @Author: 冷俊杰
* @Description: 订单信息表
* @DateTime: 2022/11/9 20:01
**/
@Data
@TableName(value = "edu_order_info")
public class EduOrderInfo {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)//创建时自动填充
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)//创建与修改时自动填充
    private Date gmtModified;

    /**
     * 讲师用户编号
     */
    @TableField(value = "lecturer_user_no")
    private Long lecturerUserNo;

    /**
     * 讲师名称
     */
    @TableField(value = "lecturer_name")
    private String lecturerName;

    /**
     * 用户编号
     */
    @TableField(value = "user_no")
    private Long userNo;

    /**
     * 用户电话
     */
    @TableField(value = "mobile")
    private String mobile;

    /**
     * 用户注册时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "register_time",fill = FieldFill.INSERT)//创建时自动填充
    private Date registerTime;

    /**
     * 订单号
     */
    @TableField(value = "order_no")
    private Long orderNo;

    /**
     * 课程ID
     */
    @TableField(value = "course_id")
    private Long courseId;

    /**
     * 课程名称
     */
    @TableField(value = "course_name")
    private String courseName;

    /**
     * 应付金额
     */
    @TableField(value = "price_payable")
    private BigDecimal pricePayable;

    /**
     * 优惠金额
     */
    @TableField(value = "price_discount")
    private BigDecimal priceDiscount;

    /**
     * 实付金额
     */
    @TableField(value = "price_paid")
    private BigDecimal pricePaid;

    /**
     * 支付方式：1微信支付，2支付宝支付
     */
    @TableField(value = "pay_type")
    private Byte payType;

    /**
     * 购买渠道：1web
     */
    @TableField(value = "channel_type")
    private Byte channelType;

    /**
     * 订单状态：1待支付，2成功支付，3支付失败，4已关闭
     */
    @TableField(value = "order_status")
    private Byte orderStatus;

    /**
     * 客户备注
     */
    @TableField(value = "remark_cus")
    private String remarkCus;

    /**
     * 后台备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 支付时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "pay_time",fill = FieldFill.INSERT)//创建时自动填充
    private Date payTime;

    /**
    *今日支付
    * */
    @TableField(exist = false)
    private Integer Pay_today;

    /**
     *今日未支付
     * */
    @TableField(exist = false)
    private Integer Unpaid_today;

    /**
     *本月支付
     * */
    @TableField(exist = false)
    private Integer Paid_this_month;

    /**
     *本月未支付
     * */
    @TableField(exist = false)
    private Integer Unpaid_this_month;

    /**
    * 总购买
    * */
    @TableField(exist = false)
    private Integer totalNum;

    /**
    * 今日购买
    * */
    @TableField(exist = false)
    private Integer todayNum;

    /**
    * 本月购买
    * */
    @TableField(exist = false)
    private Integer thisMonthNum;

    /*
    * 月收入
    * */
    @TableField(exist = false)
    private Integer Income_this_month;

    /*
     * 今日收入
     * */
    @TableField(exist = false)
    private Integer Today_income;


    public static final String COL_ID = "id";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";

    public static final String COL_LECTURER_USER_NO = "lecturer_user_no";

    public static final String COL_LECTURER_NAME = "lecturer_name";

    public static final String COL_USER_NO = "user_no";

    public static final String COL_MOBILE = "mobile";

    public static final String COL_REGISTER_TIME = "register_time";

    public static final String COL_ORDER_NO = "order_no";

    public static final String COL_COURSE_ID = "course_id";

    public static final String COL_COURSE_NAME = "course_name";

    public static final String COL_PRICE_PAYABLE = "price_payable";

    public static final String COL_PRICE_DISCOUNT = "price_discount";

    public static final String COL_PRICE_PAID = "price_paid";

    public static final String COL_PAY_TYPE = "pay_type";

    public static final String COL_CHANNEL_TYPE = "channel_type";

    public static final String COL_ORDER_STATUS = "order_status";

    public static final String COL_REMARK_CUS = "remark_cus";

    public static final String COL_REMARK = "remark";

    public static final String COL_PAY_TIME = "pay_time";
}